package com.zlf.service;

import com.zlf.mapper.RemarkMapper;
import com.zlf.po.Remark;
import com.zlf.util.CommonUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RemarkServiceImpl implements RemarkService {
    @Autowired
    private RemarkMapper remarkMapper;

    @Override
    public int saveRemarks(Remark remark) {
        remark.setRemarkDate(CommonUtil.getCurrentDate());
        remarkMapper.saveRemarks(remark);
        return remark.getRemarkId();
    }

    @Override
    public int deleteRemark(int remarkId) {
        return remarkMapper.deleteRemark(remarkId);
    }

    @Override
    public List<Remark> listRemarksByBussinessId(int businessId) {
        return remarkMapper.listRemarksByBussinessId(businessId);
    }

}
